home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 94 / CD-ROM 94.iso / util / weban / setup.msi / Cabs.w19.cab / reports.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2002-03-06  |  2.2 KB  |  54 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4.     <xsl:variable name="Assessment">
  5.       <c score="1" text="Unable to Scan"/>
  6.       <c score="2" text="Severe Risk"/>
  7.       <c score="3" text="Potential Risk"/>
  8.       <c score="4" text="Security FYIs"/>
  9.       <c score="5" text="Strong Security"/>
  10.     </xsl:variable>
  11.     <xsl:template match="/">
  12.         <html>
  13.         <head>
  14.             <link REL="stylesheet" type="text/css" href="css/scanner.css" />
  15.         </head>
  16.         <body style="BORDER-RIGHT: 0px; MARGIN: 0px; OVERFLOW: auto">
  17.             <!--StartFragment -->
  18.             <table border="0" cellpadding="0" cellspacing="0" width="100%">
  19.                 <tr class="ReportListHeader">
  20.                     <td Style="PADDING-LEFT: 10px;"><B>Computer Name</B></td>
  21.                     <td><B>IP Address</B></td>
  22.                     <td><B>Assessment</B></td>
  23.                     <td><B>Scan Date</B></td>
  24.                 </tr>
  25.                 <xsl:for-each select="Reports">
  26.                     <xsl:apply-templates>
  27.                         <xsl:sort order="sortorder" select="sortfield"/>
  28.                     </xsl:apply-templates>
  29.                 </xsl:for-each>
  30.             </table>
  31.             <!--EndFragment -->
  32.         </body>
  33.         </html>
  34.     </xsl:template>
  35.     
  36.     <xsl:template match="Report">
  37.         <xsl:param name="score" select="@grade"/>
  38.         <xsl:variable name="classname">
  39.             <xsl:choose>
  40.                 <xsl:when test="(position() mod 2) = 1">ReportsRowOverEven</xsl:when>
  41.                 <xsl:otherwise>ReportsRowOverOdd</xsl:otherwise>
  42.             </xsl:choose>
  43.         </xsl:variable>
  44.         
  45.         <tr    class="{$classname}" onmouseover="this.className='ReportsRowOverSelected';" onmouseout="this.className='{$classname}';">
  46.             <td Style="PADDING-LEFT: 10px;"><A Style="WIDTH:100%;PADDING-LEFT: 1px;" href="javascript:parent.parent.OpenReport('{@file}','{position() -1}');" class="sys-link-normal"><xsl:value-of select="@computer"/></A></td>
  47.             <td onclick="javascript:parent.parent.OpenReport('{@file}','{position() -1}');"><xsl:value-of select="@ip"/></td>
  48.             <td onclick="javascript:parent.parent.OpenReport('{@file}','{position() -1}');"><xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$score]/@text"/></td>
  49.             <td onclick="javascript:parent.parent.OpenReport('{@file}','{position() -1}');"><xsl:value-of select="@ldate"/></td>
  50.         </tr>
  51.         
  52.     </xsl:template>
  53.     
  54. </xsl:stylesheet>